<div id="old-forum-display">
    <div class="lf">
    <?php foreach($ktd_categories as $cat): ?>
        <div class="cat">
            <img style="vertical-align: top" src="/images/mgen/icon/pastille.png"/><h1><?php echo $cat->getName() ?></h1>
        </div>
        <?php foreach($cat->getForums() as $forum): ?>
        <div class="forum-list">
            <div class="lf forum-list-sprite <?php echo $forum->hasNewStuff() ? 'is-new' : 'is-old' ?>">

            </div>
            <div class="rg">
                <div class="forum-list-sprite top">
                    <div  title="<?php echo $forum->getName() ?>" style="background-image: url('<?php if($forum->getIcon() == NULL): ?>/images/forums/icon/default.jpg<?php endif;?><?php if($forum->getIcon() != NULL): ?>/uploads/images/forums/icon/<?php echo $forum->getIcon() ?><?php endif;?>')">
                        <a href="<?php echo url_for("show_forum", $forum)?>"></a>
                        <div class="last-message">
                            <span style="font-size: 5px; color: white;" class="sonic-title-font">dernier message</span>
                            <span class="bold">
                                <?php if($forum->getLastMessage() != NULL): ?>
                                <a href="<?php echo url_for("show_last_topic_message", $forum->getLastMessage()->getKTDTopic()) ?>">
                                    <?php echo KillTheDragon::shortenText($forum->getLastMessage()->getKTDTopic()->getTitle(), 40)?>
                                </a>
                                <?php else:?>
                                    Pas de messages !
                                <?php endif; ?>
                            </span>
                            <br/><br/>
                            <?php if($forum->getLastMessage() != NULL): ?>
                            <span class="bold">
                                    <?php echo link_to($forum->getLastMessage()->getKTDPlayer()->getPseudo(), 'show_player', $forum->getLastMessage()->getKTDPlayer()) ?></span>, le <?php echo $forum->getLastMessage()->getCreatedAt() ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="forum-list-sprite bottom"></div>
            </div>
        </div>
        <?php endforeach; ?>
    <?php endforeach; ?>
    
    <?php foreach($ktd_areas as $area):?>
        <div class="cat"><img style="vertical-align: top" src="/images/mgen/icon/pastille.png"/><h1><?php echo $area->getName()?></h1></div>
        <div style="clean:both; display:block"></div>
                <?php foreach($area->getRegions() as $region): ?>
        
        <div class="forum-list">
            <div class="lf forum-list-sprite <?php echo $region->hasNewStuff() ? 'is-new' : 'is-old' ?>">
                
            </div>
            <div class="rg">
                <div class="forum-list-sprite top">      
                    <div  title="<?php echo $region->getName() ?>" style="background-image: url('<?php if($region->getIcon() == NULL): ?>/images/regions/icon/default.jpg<?php endif;?><?php if($region->getIcon() != NULL): ?>/uploads/images/regions/icon/<?php echo $region->getIcon() ?><?php endif;?>')">
                        <a href="<?php echo url_for("show_region", $region)?>"></a>
                        <div class="last-message">
                            <span style="font-size: 5px; color: white;" class="sonic-title-font">derniere action</span>
                            <span class="bold">
                                <?php if($region->getLastAction() != NULL): ?>
                                <a href="<?php echo url_for("show_last_adventure_action", $region->getLastAction()->getKTDAdventure()) ?>">
                                    <?php echo KillTheDragon::shortenText($region->getLastAction()->getKTDAdventure()->getTitle(), 30) ?>
                                </a>
                                <?php else: ?>
                                Pas d'actions !
                                <?php endif; ?>
                            </span>
                            <br/><br/>
                            <?php if($region->getLastAction() != NULL): ?>
                            <span class="bold">
                                    <?php echo link_to($region->getLastAction()->getKTDCharacter()->getPseudo(), 'show_fiche', $region->getLastAction()->getKTDCharacter()) ?></span>, le <?php echo $region->getLastAction()->getCreatedAt() ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="forum-list-sprite bottom"></div>
            </div>
        </div>
        <?php endforeach; ?>
    <?php endforeach; ?>
    </div>
    <div class="gentv rg">
        <div class="foxy-coal">
            <div class="under-tv">
                <div class="news-bubble">
                    <div class="news">
                        <div>
                        <?php include_component("news", "last_news")?>
                        <?php include_component("news", "random_news")?>
                        Gen News toujours à la pointe de l'information !
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>